package com.west.xu.gateway.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
@RefreshScope
@ConfigurationProperties(prefix = "gateway.auth")
public class GatewayAuthProperties {

    /**
     * 忽略URL，List列表形式
     */
//    @Value(value = "${gateway.auth.ignoreUrl}")
    private List<String> ignoreUrl = new ArrayList<>();

    /**
     * 是否启用网关鉴权模式
     */
//    @Value(value = "${gateway.auth.enable:true}")
    private Boolean enable = false;



    public List<String> getIgnoreUrl() {
        return ignoreUrl;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setIgnoreUrl(List<String> ignoreUrl) {
        this.ignoreUrl = ignoreUrl;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }
}
